# To test that you can successfully download a file and upload it to gradescope

# You are going to write a very simple program:
def get_valid_integer(prompt):
    while True:
        user_input = input(prompt)
        try:
            # Try converting input to integer (validation step)
            return int(user_input)
        except ValueError:
            # If conversion fails, print error and exit the program
            print("That is not a number")
            exit()  # Terminate the program immediately

# Ask a user to enter two numbers (one per input)
first_number = get_valid_integer("Enter the first number: ")
second_number = get_valid_integer("Enter the second number: ")
# multiply those numbers together
product = first_number * second_number

# print out the result
print(f"The result of multiplying {first_number} and {second_number} is: {product}")
# There is an extra point available for validating that they entered numbers!
# Add to your code so that if they entered something other than an integer it prints
# 'That is not a number' and exits.

# Download your file, and upload it to the 'Week 1 Session 2 - Practice Upload' task on Minerva.
# You will get some feedback - ensure you are passing the tests!